package com.xuelang.pipeline.app.pipeline.converter;

import com.xuelang.pipeline.client.pipeline.dto.CacheSettingDTO;
import com.xuelang.pipeline.domain.pipeline.CacheSetting;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>触发配置实体和DTO的转换器</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-12 15:50
 **/
@Mapper
public interface CacheSettingToDTOConverter {

    CacheSettingToDTOConverter INSTANCE = Mappers.getMapper(CacheSettingToDTOConverter.class);

    /**
     * 从DTO转换
     * @param target
     * @return
     */
    CacheSetting fromDTO(CacheSettingDTO target);

    /**
     * 转换为DTO
     * @param target
     * @return
     */
    CacheSettingDTO toDTO(CacheSetting target);

}
